import { RouteRecordRaw, RouterView } from 'vue-router'
import layout from '@/layout/index.vue'

import { Document } from '@element-plus/icons'

const routes: RouteRecordRaw = {
  path: '/article',
  component: layout,
  name: 'Article',
  meta: { icon: Document, noCache: true },
  redirect: '/article/list',
  children: [
    {
      path: 'category',
      component: () => import('@/pages/article/category/index.vue'),
      name: 'ArticleCategory',
    },
    {
      path: 'list',
      component: () => import('@/pages/article/list/index.vue'),
      name: 'ArticleList',
    },
    {
      path: 'insert',
      component: () => import('@/pages/article/insert/index.vue'),
      name: 'InsertArticle',
    },
  ],
}

export default routes
